<template>
    <div class="login">
        <my-head title="登录">
            <template #left>
                <div class="back" @click="gotobackall">
                    <van-icon name="revoke" size="18" color="#ff5f16" />
                </div>
            </template>
        </my-head>
        <div class="login-box">
            <van-tabs v-model="active" color="#ff5f16" title-active-color="#ff5f16">
                <van-tab title="账号登录" name="username">
                    <LoginByName/>
                </van-tab>
                <van-tab title="手机登录" name="phone">
                    <LoginByPhone/>
                </van-tab>
            </van-tabs>
        </div>
        
    </div>
</template>

<script>
import LoginByName from './LoginByName.vue'
import LoginByPhone from './LoginByPhone.vue'
export default {
    data(){
        return {
            active:'username'
        }
    },
    components:{
        LoginByName,
        LoginByPhone
    }
}
</script>

<style lang="scss" scoped>
.login{
    background: #f4f4f4;
    
    .login-box{
        width:100%;
        padding:15px;

    }
}
</style>